package com.zb.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * @Author WEN
 * @Date 2023/10/25 0025
 **/
@Data
@ApiModel("工单服务费用申请对象")
public class WorkFeeVo {
    @ApiModelProperty(value = "工单服务费用申请ID，新增不必传，修改必传")
    private Long id;

    @NotNull(message = "工单ID不能为空")
    @ApiModelProperty(value = "工单ID", required = true)
    private Long workId;

    @Length(max = 200, message = "申请备注长度限制 200 个字符以内")
    @ApiModelProperty(value = "申请备注")
    private String remark;

    @Valid
    @NotNull(message = "工单费用对象不能为空，至少填写一项")
    @NotEmpty(message = "工单费用对象不能为空，至少填写一项")
    @Size(min = 1, message = "工单费用对象不能为空，至少填写一项")
    @ApiModelProperty(value = "工单服务费用对象", required = true)
    private List<WorkFeeDetailVo> feeDetails;


    @ApiModelProperty(value = "删除的工单服务费用对象ID")
    private List<Long> delFeeDetailIds;


}
